cmake_minimum_required(VERSION 3.28)
project(huafv_bluetooth_workspace C)

set(CMAKE_C_STANDARD 11)

include_directories(hci)
add_executable(
        huafv_bluetooth_workspace
        hci/hw_contorller.c
        hci/hw_contorller.h
        linux_Tests/serial/test.c
        project/linux_bt/main.c
        project/linux_bt/bt_phybusif_h4.c
        component/bluetooth/wrapper/bt_wrapper.h
        component/bluetooth/wrapper/bt_wrapper.h
        component/bluetooth/wrapper/bt_wrapper.c
        project/linux_bt/bt_config.h
        component/ringbuffer/ringbuffer.h
        component/ringbuffer/ringbuffer.c
        linux_Tests/ringbufferTest/src/main.c
        component/bluetooth/src/include/bt_common.h
        component/bluetooth/src/include/bt_hci.h
        component/bluetooth/src/include/bt_snoop.h
        component/bluetooth/src/core/bt_snoop.c
)

# defines LINUX_SRC_PATH
set(LINUX_SRC_PATH "linux_core/linux-5.15.167")

# 添加基本头文件路径
include_directories("${LINUX_SRC_PATH}/include")
include_directories("${LINUX_SRC_PATH}/arch/x86/include")
include_directories("${LINUX_SRC_PATH}/arch/x86/include/generated")
include_directories("${LINUX_SRC_PATH}/arch/x86/include/uapi")
include_directories("${LINUX_SRC_PATH}/include/uapi")
include_directories("${LINUX_SRC_PATH}/include/generated/uapi")
include_directories("${LINUX_SRC_PATH}/drivers")
include_directories("${LINUX_SRC_PATH}/arch/x86/include/asm")
include_directories("${LINUX_SRC_PATH}/include/asm-generic")
include_directories("${LINUX_SRC_PATH}/include/config")

include_directories(component/bluetooth/wrapper)
include_directories(component/ringbuffer)
include_directories(project/linux_bt)
include_directories(component/bluetooth/src/include)